package com.clw.enums;

import lombok.Getter;

/**
 * Created by MYQ on 2017/8/31.
 */
@Getter
public enum ResultEnum {
    SUCCESS(0, "成功"),
    PARAM_ERROR(1, "参数不正确"),
    LOGIN_FAIL(2, "登录失败, 登录信息不正确"),
    LOGOUT_SUCCESS(3, "登出成功"),
    SAVE_ERROR(4,"保存出错"),
    NO_FOUND(5,"找不到对应信息"),
    HAVE_CHILDREN(6,"含有子集，不能进行删除"),
    VERIFICATION_CODE_ERROR(7,"验证码错误"),
    USERNAME_HAVE_MORE(8,"用户名已经存在"),
    PASSWORD_NOT_SAME(9,"密码不一致"),
    UNAUTHORIZED_ACCESS(10,"未授权访问"),
    UPLOAD_FAIL(11,"上传失败"),
    LOGIN_FAIL_BY_STATUS(12,"未审核无法登录"),
    VERIFICATION_CODE_EXPIRED(13,"验证码过期，请刷新验证码"),
    PRODUCT_NOT_FOUND(14,"找不到对应商品"),
    ORDER_STATUS_NOT_ALLOW(15,"当前状态不允许此操作"),
    STOCK_NOT_ENOUGH(16,"当前库存不足"),;

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
